﻿<UserControl x:Class="Microsoft.Research.ScientificWorkflow.WebClient.Views.WorkflowApplication.ToolbarView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Width="Auto" Height="Auto" xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">
    <UserControl.Resources>
        <Style x:Key="ButtonStyleExecute" TargetType="Button">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid>
                            <vsm:VisualStateManager.VisualStateGroups>
                                <vsm:VisualStateGroup x:Name="FocusStates">
                                    <vsm:VisualState x:Name="Unfocused"/>
                                    <vsm:VisualState x:Name="Focused"/>
                                </vsm:VisualStateGroup>
                                <vsm:VisualStateGroup x:Name="CommonStates">
                                    <vsm:VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="border" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="00:00:00" Value="#FFFFEDC6"/>
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="border" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="00:00:00" Value="#FFEEB44F"/>
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="border" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)">
                                                <SplineColorKeyFrame KeyTime="00:00:00" Value="#FFE8A820"/>
                                            </ColorAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                    <vsm:VisualState x:Name="Normal">
                                        <Storyboard>
                                            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="border" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="00:00:00" Value="#00F0AA32"/>
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="border" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="00:00:00" Value="#00FFE2A3"/>
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="border" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)">
                                                <SplineColorKeyFrame KeyTime="00:00:00" Value="#00E8A820"/>
                                            </ColorAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                    <vsm:VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="border" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="00:00:00" Value="#FFF9DEA1"/>
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="border" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="00:00:00" Value="#FFECA936"/>
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="border" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)">
                                                <SplineColorKeyFrame KeyTime="00:00:00" Value="#FFE8A820"/>
                                            </ColorAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                    <vsm:VisualState x:Name="Disabled">
										<Storyboard>
											<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.Opacity)">
												<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.4"/>
											</DoubleAnimationUsingKeyFrames>
										</Storyboard>
									</vsm:VisualState>
                                </vsm:VisualStateGroup>
                            </vsm:VisualStateManager.VisualStateGroups>
                            <Border BorderBrush="#00FFFFFF" BorderThickness="1,1,1,1" CornerRadius="4,4,4,4" x:Name="border">
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#00FFFFFF"/>
                                        <GradientStop Color="#00FFFFFF" Offset="1"/>
                                    </LinearGradientBrush>
                                </Border.Background>

                                <Grid Margin="2,2,2,2" x:Name="grid">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="30"/>
                                        <ColumnDefinition Width="*"/>
                                    </Grid.ColumnDefinitions>
                                    <Image Height="32" HorizontalAlignment="Center" VerticalAlignment="Center" Width="32" Grid.ColumnSpan="1" Source="../../Images/Play.png"/>
                                    <ContentPresenter Grid.Column="1" d:LayoutOverrides="Width, Height" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="4,0,4,0"/>
                                </Grid>
                            </Border>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="ButtonStyleTerminate" TargetType="Button">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid>
                            <vsm:VisualStateManager.VisualStateGroups>
                                <vsm:VisualStateGroup x:Name="FocusStates">
                                    <vsm:VisualState x:Name="Unfocused"/>
                                    <vsm:VisualState x:Name="Focused"/>
                                </vsm:VisualStateGroup>
                                <vsm:VisualStateGroup x:Name="CommonStates">
                                    <vsm:VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="border" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="00:00:00" Value="#FFFFEDC6"/>
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="border" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="00:00:00" Value="#FFEEB44F"/>
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="border" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)">
                                                <SplineColorKeyFrame KeyTime="00:00:00" Value="#FFE8A820"/>
                                            </ColorAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                    <vsm:VisualState x:Name="Normal">
                                        <Storyboard>
                                            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="border" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="00:00:00" Value="#00F0AA32"/>
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="border" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="00:00:00" Value="#00FFE2A3"/>
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="border" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)">
                                                <SplineColorKeyFrame KeyTime="00:00:00" Value="#00E8A820"/>
                                            </ColorAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                    <vsm:VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="border" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="00:00:00" Value="#FFF9DEA1"/>
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="border" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                <SplineColorKeyFrame KeyTime="00:00:00" Value="#FFECA936"/>
                                            </ColorAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="border" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)">
                                                <SplineColorKeyFrame KeyTime="00:00:00" Value="#FFE8A820"/>
                                            </ColorAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                    <vsm:VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.4"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </vsm:VisualState>
                                </vsm:VisualStateGroup>
                            </vsm:VisualStateManager.VisualStateGroups>
                            <Border BorderBrush="#00FFFFFF" BorderThickness="1,1,1,1" CornerRadius="4,4,4,4" x:Name="border">
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#00FFFFFF"/>
                                        <GradientStop Color="#00FFFFFF" Offset="1"/>
                                    </LinearGradientBrush>
                                </Border.Background>

                                <Grid Margin="2,2,2,2" x:Name="grid">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="30"/>
                                        <ColumnDefinition Width="*"/>
                                    </Grid.ColumnDefinitions>
                                    <Image Height="32" HorizontalAlignment="Center" VerticalAlignment="Center" Width="32" Grid.ColumnSpan="1" Source="../../Images/Terminate.png"/>
                                    <ContentPresenter Grid.Column="1" d:LayoutOverrides="Width, Height" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="4,0,4,0"/>
                                </Grid>
                            </Border>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot" Background="White">

    	<Grid HorizontalAlignment="Stretch" Height="70" VerticalAlignment="Top">
    		<Grid.Background>
    			<LinearGradientBrush EndPoint="0.98,0.5" StartPoint="0.023,0.5">
    				<GradientStop Color="#FF81C5DE"/>
    				<GradientStop Color="#FF1999CA" Offset="1"/>
    				<GradientStop Color="#FFB5E0F0" Offset="0.277"/>
    			</LinearGradientBrush>
    		</Grid.Background>
            <Path Fill="#33FFFFFF" Stretch="Fill" Stroke="#FF000000" StrokeThickness="0" HorizontalAlignment="Right" Margin="0,-14.959,253.227,34.88" Width="99.546" RenderTransformOrigin="0.5,0.5" Data="M0.5,7.001 C0.5,3.4105968 3.4105968,0.5 7.001,0.5 L84.303,0.5 C87.893403,0.5 90.804,3.4105968 90.804,7.001 L90.899001,32.196912 C90.899001,35.787315 87.893403,39.9038 84.303,39.9038 L7.001,45.48 C3.4105968,45.48 0.5,42.569403 0.5,38.979 z">
                <Path.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="1" ScaleY="1"/>
                        <SkewTransform AngleX="0" AngleY="6.117"/>
                        <RotateTransform Angle="0"/>
                        <TranslateTransform X="0" Y="0.0050905405498014034"/>
                    </TransformGroup>
                </Path.RenderTransform>
            </Path>
            <Path Fill="#33FFFFFF" Stretch="Fill" Stroke="#FF000000" StrokeThickness="0" HorizontalAlignment="Right" Margin="0,-7.241,125.278,0" Width="43.546" RenderTransformOrigin="0.5,0.5" Data="M0.5,7.001 C0.5,3.4105968 3.4105968,0.5 7.001,0.5 L84.303,0.5 C87.893403,0.5 90.804,3.4105968 90.804,7.001 L90.899001,32.196912 C90.899001,35.787315 87.893403,39.9038 84.303,39.9038 L7.001,45.48 C3.4105968,45.48 0.5,42.569403 0.5,38.979 z" VerticalAlignment="Top" Height="29.956">
                <Path.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="1" ScaleY="1"/>
                        <SkewTransform AngleX="0" AngleY="6.117"/>
                        <RotateTransform Angle="0"/>
                        <TranslateTransform X="0" Y="0.0050905405498014034"/>
                    </TransformGroup>
                </Path.RenderTransform>
            </Path>
            <Path Fill="#33FFFFFF" Stretch="Fill" Stroke="#FF000000" StrokeThickness="0" HorizontalAlignment="Right" Margin="0,22.999,218.278,11.152" Width="71.546" RenderTransformOrigin="0.5,0.5" Data="M0.5,7.001 C0.5,3.4105968 3.4105968,0.5 7.001,0.5 L84.303,0.5 C87.893403,0.5 90.804,3.4105968 90.804,7.001 L90.899001,32.196912 C90.899001,35.787315 87.893403,39.9038 84.303,39.9038 L7.001,45.48 C3.4105968,45.48 0.5,42.569403 0.5,38.979 z">
                <Path.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="1" ScaleY="1"/>
                        <SkewTransform AngleX="0" AngleY="6.117"/>
                        <RotateTransform Angle="0"/>
                        <TranslateTransform X="0" Y="0.0050905405498014034"/>
                    </TransformGroup>
                </Path.RenderTransform>
            </Path>
            <Path Fill="#26FFFFFF" Stretch="Fill" Stroke="#FF000000" StrokeThickness="0" HorizontalAlignment="Right" Margin="0,14.041,58.278,12.344" Width="99.546" RenderTransformOrigin="0.5,0.5" Data="M0.5,7.001 C0.5,3.4105968 3.4105968,0.5 7.001,0.5 L84.303,0.5 C87.893403,0.5 90.804,3.4105968 90.804,7.001 L90.899001,32.196912 C90.899001,35.787315 87.893403,39.9038 84.303,39.9038 L7.001,45.48 C3.4105968,45.48 0.5,42.569403 0.5,38.979 z" d:LayoutOverrides="Width">
                <Path.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="1" ScaleY="1"/>
                        <SkewTransform AngleX="0" AngleY="6.117"/>
                        <RotateTransform Angle="0"/>
                        <TranslateTransform X="0" Y="0.0050905405498014034"/>
                    </TransformGroup>
                </Path.RenderTransform>
            </Path>
            <Path Fill="#33FFFFFF" Stretch="Fill" Stroke="#FF000000" StrokeThickness="0" HorizontalAlignment="Right" Margin="0,-2.494,-0.721,33.145" Width="78.216" RenderTransformOrigin="0.5,0.5" Data="M0.5,7.001 C0.5,3.4105968 3.4105968,0.5 7.001,0.5 L84.303,0.5 C87.893403,0.5 90.804,3.4105968 90.804,7.001 L90.899001,32.196912 C90.899001,35.787315 87.893403,39.9038 84.303,39.9038 L7.001,45.48 C3.4105968,45.48 0.5,42.569403 0.5,38.979 z" d:IsHidden="True">
                <Path.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="1" ScaleY="1"/>
                        <SkewTransform AngleX="0" AngleY="6.117"/>
                        <RotateTransform Angle="0"/>
                        <TranslateTransform X="0" Y="0.0050905405498014034"/>
                    </TransformGroup>
                </Path.RenderTransform>
            </Path>
            <Path Fill="#33FFFFFF" Stretch="Fill" Stroke="#FF000000" StrokeThickness="0" HorizontalAlignment="Right" Margin="0,10.847,331.279,20.804" Width="53.216" RenderTransformOrigin="0.5,0.5" Data="M0.5,7.001 C0.5,3.4105968 3.4105968,0.5 7.001,0.5 L84.303,0.5 C87.893403,0.5 90.804,3.4105968 90.804,7.001 L90.899001,32.196912 C90.899001,35.787315 87.893403,39.9038 84.303,39.9038 L7.001,45.48 C3.4105968,45.48 0.5,42.569403 0.5,38.979 z">
                <Path.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="1" ScaleY="1"/>
                        <SkewTransform AngleX="0" AngleY="6.117"/>
                        <RotateTransform Angle="0"/>
                        <TranslateTransform X="0" Y="0.0050905405498014034"/>
                    </TransformGroup>
                </Path.RenderTransform>
            </Path>
            <Path Fill="#33FFFFFF" Stretch="Fill" Stroke="#FF000000" StrokeThickness="0" HorizontalAlignment="Right" Margin="0,9.618,150.278,26.426" Width="59.546" RenderTransformOrigin="0.5,0.5" Data="M0.5,7.001 C0.5,3.4105968 3.4105968,0.5 7.001,0.5 L84.303,0.5 C87.893403,0.5 90.804,3.4105968 90.804,7.001 L90.899001,32.196912 C90.899001,35.787315 87.893403,39.9038 84.303,39.9038 L7.001,45.48 C3.4105968,45.48 0.5,42.569403 0.5,38.979 z">
                <Path.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="1" ScaleY="1"/>
                        <SkewTransform AngleX="0" AngleY="6.117"/>
                        <RotateTransform Angle="0"/>
                        <TranslateTransform X="0" Y="0.0050905405498014034"/>
                    </TransformGroup>
                </Path.RenderTransform>
            </Path>
            <StackPanel HorizontalAlignment="Stretch" Orientation="Horizontal">
    			<StackPanel.Background>
    				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    					<GradientStop Color="#00FFFFFF" Offset="0"/>
    					<GradientStop Color="#CCFFFFFF" Offset="1"/>
    				</LinearGradientBrush>
    			</StackPanel.Background>
    			<Border BorderBrush="#FFBFBFBF" BorderThickness="1,1,1,1" CornerRadius="3,3,3,3" Margin="5,5,2,5">
    				<Border.Background>
    					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    						<GradientStop Color="#FFF3F3F3" Offset="0"/>
    						<GradientStop Color="#FFEBF3F6" Offset="1"/>
    						<GradientStop Color="#FFE7E9EA" Offset="0.714"/>
    						<GradientStop Color="#FFD5DBDE" Offset="0.723"/>
    					</LinearGradientBrush>
    				</Border.Background>
    				<Grid>
    					<Grid.RowDefinitions>
    						<RowDefinition Height="*"/>
    						<RowDefinition Height="17"/>
    					</Grid.RowDefinitions>
    					<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Row="1" FontSize="11" Foreground="#FF494949" Text="Workflow" TextWrapping="Wrap"/>
    					<StackPanel HorizontalAlignment="Stretch" Orientation="Horizontal">
    						<Button Style="{StaticResource ButtonStyleExecute}" Content="Execute" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="10,4,10,4" x:Name="btnExecute"/>
    						<Button Style="{StaticResource ButtonStyleTerminate}" Content="Terminate" Margin="0,4,10,4" x:Name="btnTerminate"/>
    					</StackPanel>
    				</Grid>
    			</Border>
    		</StackPanel>
    	</Grid>
        <Grid HorizontalAlignment="Right" VerticalAlignment="Top" Margin="5">
            <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <StackPanel Orientation="Horizontal"  Grid.Row="0">
                <TextBlock  FontSize="14" FontFamily="Segoe UI" Text="Welcome "/>
                <TextBlock x:Name="tbxUserName" FontSize="14" FontFamily="Segoe UI"/>
            </StackPanel>
            <HyperlinkButton x:Name="hbtnSignIn" Foreground="#FF1561A8" ClickMode="Press" Content="Sign In" Margin="5,0,0,0" FontSize="14"  Grid.Row="1" HorizontalAlignment="Right"/>
            <HyperlinkButton x:Name="hbtnSignOut" Foreground="#FF1561A8" ClickMode="Press" Content="Sign Out" Margin="5,0,0,0" FontSize="14" Grid.Row="1"  HorizontalAlignment="Right"/>
        </Grid>
    </Grid>
</UserControl>
